It does not make a great amount of sense to have this function
on the login screen. And worse, it does not work, since the greeter
is currently a modal dialog, so interaction with the opening
window is impossible.
https://bugzilla.gnome.org/show_bug.cgi?id=659164
this._sync_config();
- this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
- this.menu.addAction(_("Show Keyboard Layout"), Lang.bind(this, function() {
- Main.overview.hide();
- Util.spawn(['gkbd-keyboard-display', '-g', String(this._config.get_current_group() + 1)]);
- }));
+ if (global.session_type == Shell.SessionType.USER) {
+ this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
+ this.menu.addAction(_("Show Keyboard Layout"), Lang.bind(this, function() {
+ Main.overview.hide();
+ Util.spawn(['gkbd-keyboard-display', '-g', String(this._config.get_current_group() + 1)]);
+ }));
+ }
this.menu.addSettingsAction(_("Region and Language Settings"), 'gnome-region-panel.desktop');
},